<script>
    console.log(1)
    console.log(Date.now(), '.....')
    
    setTimeout(() => {
        console.log(2)
        console.log(Date.now(), '.....')

    }, 1000)
    
    const t = Date.now()
    while(Date.now() - t < 2000){
    }
</script>